# ${title}数据库设计文档

> ${description}

<#list tableList as table>
#### ${table_index + 1}. ${table.comment}
##### 表名：${table.name}

|序号|字段名|字段类型|长度|完整类型|是否为空|默认值|是否主键|是否唯一值|是否索引|说明|
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:----|
<#list table.columns as column>
| ${column_index + 1} | ${column.name} | ${column.dataType} | ${column.length} | ${column.columnType} | ${column.nullAble} | ${column.defaultSqlValue} | ${column.primaryKey} | ${column.indexKey} | ${column.uniqueKey} | ${column.comment} |
</#list>
##### SQL语句:
```sql
CREATE TABLE IF NOT EXISTS `${table.name}`(
    <#list table.columns as column>
    `${column.name}` ${column.columnType}<#if "${column.nullAble}"=="是"> DEFAULT NULL<#else><#if '${column.primaryKey}'=="是"> NOT NULL <#else> NOT NULL DEFAULT ${column.defaultSqlValue}</#if></#if> COMMENT '${column.comment}',
    </#list>
    ${table.primaryKeyContent}
) ENGINE = InnoDB
  DEFAULT CHARSET = ${table.defaultCharset}
  COLLATE = ${table.collation} COMMENT ='${table.comment}';
```

</#list>